const redisHost = require('./common/redis_host.js');
const offlineConfig = require('./common/offline');

const config = {};

config.backend = {
    // 积分服务
    score : {
        host: '127.0.0.1',
        port: 8080
    },
};

// 日志

const logLevels = ['fatal', 'error', 'warn', 'info', 'debug', 'trace'];

config.log = {
    name: 'node-ssr',
    streams: logLevels.map(item => {
        return {
            level: item,
            stream: process.stdout
        }
    })
};

// mysql配置
config.mysql = {
    connectionLimit: 10,
    host: '127.0.0.1',
    user: 'root',
    password: '123456',
    database: 'fund',
    charset: 'UTF8_GENERAL_CI',
    timezone: 'local',
    connectTimeout: 10000
};

config.redis = {
    //是否是集群模式
    isCluster: true,
    clusterServer: redisHost.cluster_local,
};
  
module.exports = Object.assign( {} , config, offlineConfig );